/**
 * @author Mr.zng
 * @create 2023-05-27 10:25
 * @Description
 */
package com.crm.controller.util;

import lombok.Data;

@Data
public class demo {
    private Boolean flag;
    private Object data;
    private String msg;


    public demo(){};


    // public DataTem(Boolean flag,String msg){
    //     this.flag = flag;
    //     this.data = null;
    //     this.msg = this.getFlag() ? "添加成功":"添加失败" ;
    // }
    public demo(Boolean flag, Object data){

        this.flag = flag;
        this.data = data;
        this.msg = this.getFlag() ? "true":"false" ; //一大改进
    }
    void test(){
        String str = new demo(false,"1234").toString();
        System.out.println(str);
        String str1 = new demo(true,"1234").toString();
        System.out.println(str1);
    }

    public static void main(String[] args) {
        new demo().test();
    }
}
